Skip to main content

Read List Item

AutomatR.DefaultActivities.List.ReadListItem<T>

The "Read List Item" activity in AutomatR, categorized under List, enables you to fetch the value of a specific item in a list. This activity is particularly useful when you need to retrieve the value stored at a particular index within a list.

Properties

NameDescription
Input
Index NumberSpecifies the index of the item you want to read from the list. It represents the position of the item in the list. Integer variables containing the index value.
ListSpecifies the list from which you want to read the item. It represents the list containing the desired data. Variables of type List\<T> containing the data.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Read List Item" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the wait time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultOutputs the reference of the value of the item at the specified index in a variable of type T. This variable can be used in subsequent activities or conditions. Variables of type T to store the item value.

How to use:

  1. Drag and drop the "Read List Item" activity onto the workflow.
  2. Configure the properties, specifying the list from which to read, the index of the item, and an optional delay based on your requirements.
  3. Execute the workflow to retrieve the value of the specified item from the list.
  4. Utilize the output variable (Result) in subsequent activities or conditions.

Example: Consider an example where the "Read List Item" activity is used to retrieve a specific value from a list of integers:

Read List Item:
List: myList
Index: 2
Result: retrievedValue

In this example, the activity reads the value at index 2 from the list named "myList" and stores it in the variable "retrievedValue" for further use in the workflow.